package com.cx.interact.server.common.service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Service;
import com.cx.base.autoDoc.annotations.AutoDocField;
import com.cx.base.autoDoc.annotations.AutoDocMethod;
import com.cx.base.autoDoc.annotations.AutoDocType;
import com.cx.base.exception.SoaException;
import com.cx.interact.interfaces.common.dto.test.TestResDTO;
import com.cx.interact.interfaces.common.dto.test.TestResThreeDTO;
import com.cx.interact.interfaces.common.dto.test.TestResTwoDTO;
import com.cx.interact.interfaces.common.service.test.TestService;


@Service
@Component
@AutoDocType("测试类")
public class TestServiceImpl implements TestService{

	@Override
	@AutoDocMethod(name = "查询售后订单列表",  desc="applyStatus 为必传参数",resClazz = TestResDTO.class,resSet="list")
	public TestResDTO doTest(@AutoDocField("姓名") String name) throws SoaException {

		TestResDTO dto = new TestResDTO();
		dto.setName("岑溪");
		dto.setNum(5L);
		dto.setDate(new Date());
		TestResTwoDTO twoDTO = new TestResTwoDTO();
		twoDTO.setTwoName("two岑溪");
		List<TestResTwoDTO> list = new ArrayList<TestResTwoDTO>();
		list.add(twoDTO);
		
		TestResThreeDTO threeDTO = new TestResThreeDTO();
		threeDTO.setThreeName("Three岑溪");
		
		dto.setTestResThreeDTO(threeDTO);
		dto.setList(list);
		
		return dto;
	}

}
